VERSION 1.0 CLASS
BEGIN
  MultiUse = -1  'True
  Persistable = 0  'NotPersistable
  DataBindingBehavior = 0  'vbNone
  DataSourceBehavior  = 0  'vbNone
  MTSTransactionMode  = 0  'NotAnMTSObject
END
Attribute VB_Name = "Room"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = False
Dim loc As String
Dim Cloc As String
Dim Numusers As Long
Dim Desc As String
Dim exits() As String
Dim exitto() As String

Public Sub userenter()
Numusers = Numusers + 1
End Sub

Public Sub userleave()
Numusers = Numusers - 1
End Sub

Property Get isempty()
isempty = (Numusers <= 0)
End Property

Property Get description()
description = Desc
End Property

Property Let description(x)
Desc = x
End Property

Property Get location()
location = loc
End Property

Property Let location(x)
Cloc = "Rooms\" & x
If loc <> "" Then savelocation
loc = x
loadlocation
End Property

Property Get cexits()
cexits = Join(exits, "|")
End Property

Property Get cexitto()
cexitto = Join(exitto, "|")
End Property

Public Sub savelocation()
Setprop Cloc & ".desc", Desc
Setprop Cloc & ".exits", Join(exits, vbCrLf)
Setprop Cloc & ".exitto", Join(exitto, vbCrLf)
End Sub

Public Sub loadlocation()
Desc = Getprop(Cloc & ".desc")
exits = Split(Getprop(Cloc & ".exits"), vbCrLf)
exitto = Split(Getprop(Cloc & ".exitto"), vbCrLf)
End Sub
